﻿namespace PayPal.ButtonManager
{
    using System.Collections.Generic;

    /// <summary>
    /// For a complete documentation of the variables see: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables
    /// </summary>
    public class HtmlButtonVariables
    {
        private static Dictionary<string, string> Names = new Dictionary<string, string>() 
        {
            {"Business", "business"},
            {"ItemName", "item_name"},
            {"Amount", "amount"},
            {"CurrencyCode", "currency_code"},
            {"NotifyUrl", "notify_url"},
            {"DiscountAmount", "discount_amount"},
            {"DiscountAmount2", "discount_amount2"},
            {"DiscountRate", "discount_rate"},
            {"DiscountRate2", "discount_rate2"},
            {"DiscountNum", "discount_num"},
            {"ItemNumber", "item_number"},
            {"Quantity", "quantity"},
            {"Shipping", "shipping"},
            {"Shipping2", "shipping2"},
            {"Tax", "tax"},
            {"TaxRate", "tax_rate"},
            {"UndefinedQuantity", "undefined_quantity"},
            {"Weight", "weight"},
            {"WeightUnit", "weight_unit"},
            {"AddressOverride", "address_override"},
            {"Handling", "handling"},
            {"Custom", "custom"},
            {"Invoice", "invoice"},            
            {"TaxCart", "tax_cart"},
            {"WeightCart", "weight_cart"},            
            {"DiscountAmountCart", "discount_amount_cart"},
            {"DiscountAmountX", "discount_amount_x"},
            {"DiscountRateCart", "discount_rate_cart"},
            {"DiscountRateX", "discount_rate_x"},
            {"Display", "display"},
            {"HandlingCart", "handling_cart"},
            {"ShoppingUrl", "shopping_url"},
            {"Upload", "upload"},            
            {"A1", "a1"},
            {"P1", "p1"},
            {"T1", "t1"},
            {"A2", "a2"},
            {"P2", "p2"},
            {"T2", "t2"},
            {"A3", "a3"},
            {"P3", "p3"},
            {"T3", "t3"},
            {"Src", "src"},
            {"Srt", "srt"},
            {"Sra", "sra"},
            {"NoNote", "no_note"},
            {"Modify", "modify"},
            {"UsrManage", "usr_manage"}                        
        };

        public string Business { get; set; }

        public string ItemName { get; set; }

        public string Amount { get; set; }

        public string CurrencyCode { get; set; }

        public string NotifyUrl { get; set; }

        public string DiscountAmount { get; set; }

        public string DiscountAmount2 { get; set; }

        public string DiscountRate { get; set; }

        public string DiscountRate2 { get; set; }

        public string DiscountNum { get; set; }

        public string ItemNumber { get; set; }

        public string Quantity { get; set; }

        public string Shipping { get; set; }

        public string Shipping2 { get; set; }

        public string Tax { get; set; }

        public string TaxRate { get; set; }

        public string UndefinedQuantity { get; set; }

        public string Weight { get; set; }

        public string WeightUnit { get; set; }

        public string AddressOverride { get; set; }

        public string Handling { get; set; }

        public string Custom { get; set; }

        public string Invoice { get; set; }

        public string TaxCart { get; set; }

        public string WeightCart { get; set; }

        public string DiscountAmountCart { get; set; }

        public string DiscountAmountX { get; set; }

        public string DiscountRateCart { get; set; }

        public string DiscountRateX { get; set; }

        public string Display { get; set; }

        public string HandlingCart { get; set; }

        public string ShoppingUrl { get; set; }

        public string Upload { get; set; }

        // HTML Variables for Subscribe Buttons

        public string A1 { get; set; }

        public string P1 { get; set; }

        public string T1 { get; set; }

        public string A2 { get; set; }

        public string P2 { get; set; }

        public string T2 { get; set; }

        public string A3 { get; set; }

        public string P3 { get; set; }

        public string T3 { get; set; }

        public string Src { get; set; }

        public string Srt { get; set; }

        public string Sra { get; set; }

        public string NoNote { get; set; }

        public string Modify { get; set; }

        public string UsrManage { get; set; }

        public static string GetVariableName(string propertyName)
        {
            return Names[propertyName];
        }
    }
}
